package org.yuedu;

import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.MediaType;
import org.eclipse.microprofile.openapi.annotations.Operation;
import org.eclipse.microprofile.openapi.annotations.media.Content;
import org.eclipse.microprofile.openapi.annotations.media.Schema;
import org.eclipse.microprofile.openapi.annotations.responses.APIResponse;
import org.eclipse.microprofile.openapi.annotations.tags.Tag;

@Path("/hello")
@Tag(name = "Greeting", description = "Greeting management endpoints")
public class GreetingResource {

    @GET
    @Produces(MediaType.TEXT_PLAIN)
    @Operation(summary = "Get a greeting message", description = "Returns a simple greeting message from the server")
    @APIResponse(responseCode = "200", description = "Successful response", 
        content = @Content(mediaType = MediaType.TEXT_PLAIN, 
        schema = @Schema(implementation = String.class, description = "Greeting message")))
    public String hello() {
        return "Hello from Quarkus REST";
    }
}